#!/usr/bin/env node 
const fs=require('fs');
const file=process.argv[2];
//get file size
let len=fs.statSync(file).size;
let buf=Buffer.alloc(len);
//open
let fid=fs.openSync(file,'r');
//read
fs.readSync(fid,buf,0,len,0);
//close
console.log(buf.toString('utf8'));
fs.closeSync(fid);
